#include <iostream>
using namespace std;
/*
class MArray
{
    public:
        int content[10];
        int n;
        MArray(){ n = 0;}
        int push_back(int value)
        {
            content[n] = value;
            n++;
            return n;
        }
        int at(int i)
        {
            return content[i];
        }
        int operator[](int i)
        {
            return content[i];
            //return array.at(i);
        }
    
};
*/
template <class T>
class MyArray
{
    public:
     T content[10];
     int n;
     MyArray(){  n = 0; }
     void push_back(T value)
     {
         content[n] = value;
         n++;
     }  
     T at(int i)
     {
         return content[i];
     }
     T operator[](int i)
    {
        return content[i];
        //return array.at(i);
    }
     
};


int main()
{

    //MArray array;
    MyArray<int> array;
    array.push_back(1);
    array.push_back(2);
    cout<<array.at(0)<<":"<<array.at(1)<<endl;
    cout<<array[0]<<":"<<array[1]<<endl;
}